GXDefaultPrinter
QuickDraw GX sends theGXDefaultPrinter
message when an application creates a new printer object. You can override theGXDefaultPrinter
message to modify the default printer object as it is being created. Your override of theGXDefaultPrinter
message must match the following formal declaration:
OSErr MyDefaultPrinter (gxPrinter aPrinter);
aPrinter
- The printer object.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX sends theGXDefaultPrinter
message when an application calls theGXNewJob
function to create a new job object.You override this message if you need to modify the default printer object at the time that it is created. For example, you may want your printer driver to supply an application with the list of the valid color spaces and printing devices that it supports. After you forward this message down the message chain, you can add your own information to the printer object or change information that was placed there by the default implementation. The default implementation of this message provides the default information for the printer object.
SPECIAL CONSIDERATIONS
You never send theGXDefaultPrinter
message yourself.You must forward the
GXDefaultPrinter
message to other message handlers. Always forward it before you add or change printer information.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. SEE ALSO
You can find an example of an override of theGXDefaultPrinter
message in
Listing 3-5 on page 3-25 in the chapter "Printer Drivers."The
GXNewJob
function is described in Inside Macintosh: QuickDraw GX Printing.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help